package com.example.common.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.checkerframework.checker.units.qual.C;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @ClassName CheckupReserve
 * @Author wengjt
 * @Date 2021/5/6 17:56
 * @Description 体检预约订单
 **/
@ApiModel(value = "体检预约订单")
@Data
@Table(name = "checkup_reserve")
public class CheckupReserve {
    @Id
    @Column(name = "cr_order_no_nvarchar")
    @ApiModelProperty(value = "体检订单号")
    private String crOrderNo;

    @Column(name = "p_id_bigint")
    @ApiModelProperty(value = "患者id")
    private Long pId;

    @ApiModelProperty(value = "患者名字")
    private String pName;

    @Column(name = "uid_bigint")
    @ApiModelProperty(value = "用户id")
    private Long uid;
    @Column(name = "product_id_bigint")
    @ApiModelProperty(value = "检查项目id")
    private Long productId;
    @ApiModelProperty(value = "检查项目名称")
    private String productName;
    @ApiModelProperty(value = "检查项目类型id")
    private Integer ctId;
    @ApiModelProperty(value = "检查项目类型")
    private String ctName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "reserve_date")
    @ApiModelProperty(value = "预约时间")
    private Date reserve;

    @Column(name = "link_man_nvarchar")
    @ApiModelProperty(value = "联系人姓名")
    private String linkMan;

    @Column(name = "link_tel_nvarchar")
    @ApiModelProperty(value = "联系人电话")
    private String linkTel;

    @Column(name = "r_status_tinyint")
    @ApiModelProperty(value = "预约状态 0->待审核 1->已经同意 2->已经拒绝")
    private Integer rStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "checkup_date")
    @ApiModelProperty(value = "体检时间")
    private Date checkup;

    @Column(name = "checkup_address_nvarchar")
    @ApiModelProperty(value = "体检地址")
    private String checkupAddress;

    @Column(name = "refuse_reason_nvarchar")
    @ApiModelProperty(value = "拒绝理由")
    private String refuseReason;

    @Column(name = "remark_nvarchar")
    @ApiModelProperty(value = "备注")
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time_datetime")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "是否禁用")
    private Integer disable;
}
